home *** CD-ROM | disk | FTP | other *** search
/ The Atari Compendium / The Atari Compendium (Toad Computers) (1994).iso / files / prgtools / gnustuff / tos / updates / update33.zoo / gcc-250 / gcc-250.diff < prev    next >
Encoding:
Text File  |  1993-10-26  |  63.5 KB  |  2,343 lines

  1. diff -rc gcc-2.5.0/bc-emit.c /net/acae127/home/bammi/usr2/gcc/bc-emit.c
  2. *** gcc-2.5.0/bc-emit.c    Tue Oct 12 20:16:34 1993
  3. --- /net/acae127/home/bammi/usr2/gcc/bc-emit.c    Tue Oct 26 20:23:08 1993
  4. ***************
  5. *** 223,229 ****
  6. --- 223,234 ----
  7.         seg->data = xrealloc (seg->data, seg->alloc);
  8.       }
  9.   
  10. + #ifdef atarist
  11. +   /* figure out later where memset dissappeared to in gnu.olb */
  12. +   bzero (seg->data + seg->size, size);
  13. + #else
  14.     memset (seg->data + seg->size, 0, size);
  15. + #endif
  16.     seg->size += size;
  17.   }
  18.   
  19. diff -rc gcc-2.5.0/c-lex.c /net/acae127/home/bammi/usr2/gcc/c-lex.c
  20. *** gcc-2.5.0/c-lex.c    Wed Sep 29 01:42:10 1993
  21. --- /net/acae127/home/bammi/usr2/gcc/c-lex.c    Tue Oct 26 08:21:29 1993
  22. ***************
  23. *** 473,484 ****
  24. --- 473,486 ----
  25.       case '\r':
  26.         /* ANSI C says the effects of a carriage return in a source file
  27.            are undefined.  */
  28. + #ifndef atarist /* but not on an atarist, though hopefully we should'nt see it */
  29.         if (pedantic && !newline_warning)
  30.           {
  31.             warning ("carriage return in source file");
  32.             warning ("(we only warn about the first carriage return)");
  33.             newline_warning = 1;
  34.           }
  35. + #endif
  36.         c = getc (finput);
  37.         break;
  38.   
  39. diff -rc gcc-2.5.0/calls.c /net/acae127/home/bammi/usr2/gcc/calls.c
  40. *** gcc-2.5.0/calls.c    Fri Oct  8 18:26:59 1993
  41. --- /net/acae127/home/bammi/usr2/gcc/calls.c    Tue Oct 26 08:21:38 1993
  42. ***************
  43. *** 2099,2104 ****
  44. --- 2099,2110 ----
  45.   
  46.     argvec = (struct arg *) alloca (nargs * sizeof (struct arg));
  47.   
  48. + /* how would you do this RIGHT ?? fake a DECL node? dunno... */
  49. + #ifdef ENCODE_SECTION_INFO
  50. +   /* mark it as a function (to be in the text section that is) */
  51. +   SYMBOL_REF_FLAG (fun) = 1;
  52. + #endif
  53.     INIT_CUMULATIVE_ARGS (args_so_far, NULL_TREE, fun);
  54.   
  55.     args_size.constant = 0;
  56. diff -rc gcc-2.5.0/cccp.c /net/acae127/home/bammi/usr2/gcc/cccp.c
  57. *** gcc-2.5.0/cccp.c    Wed Oct 20 19:12:25 1993
  58. --- /net/acae127/home/bammi/usr2/gcc/cccp.c    Tue Oct 26 20:31:18 1993
  59. ***************
  60. *** 77,82 ****
  61. --- 77,83 ----
  62.   #include <stdio.h>
  63.   #include <signal.h>
  64.   
  65. + #ifndef atarist
  66.   #ifndef VMS
  67.   #ifndef USG
  68.   #include <sys/time.h>        /* for __DATE__ and __TIME__ */
  69. ***************
  70. *** 86,95 ****
  71. --- 87,110 ----
  72.   #include <fcntl.h>
  73.   #endif /* USG */
  74.   #endif /* not VMS */
  75. + #endif /* not atarist */
  76.   
  77.   /* This defines "errno" properly for VMS, and gives us EACCES. */
  78.   #include <errno.h>
  79.   
  80. + /* atarist  specific defs and includes */
  81. + #ifdef atarist
  82. + #include <time.h>
  83. + #include <file.h>
  84. + #include <string.h>
  85. + #include <stddef.h>
  86. + long _stksize = -1L;    /* want big stack cause include files
  87. +                    get alloca'ed there */
  88. + #define read(fd,buf,size)    _text_read(fd,buf,size)
  89. + #endif /* atarist */
  90.   /* VMS-specific definitions */
  91.   #ifdef VMS
  92.   #include <time.h>
  93. ***************
  94. *** 979,984 ****
  95. --- 994,1020 ----
  96.   /* Nonzero means -I- has been seen,
  97.      so don't look for #include "foo" the source-file directory.  */
  98.   static int ignore_srcdir;
  99. +  
  100. + #ifdef atarist
  101. + /* the following dingus is used in place of some calls to bcopy,
  102. +    to ensure that backslashes get properly slashified when getting
  103. +    shoved into strings.  Note that it returns the new pointer!!
  104. +    There ought to be a better way... */
  105. + U_CHAR * slashifying_bcopy(from_buf, to_buf, nbytes)
  106. + U_CHAR * from_buf, * to_buf;
  107. + int nbytes;
  108. + {
  109. +   for ( ; nbytes > 0 ; )
  110. +     {
  111. +     if(*from_buf == '\\')
  112. +         *to_buf++ = '\\';
  113. +     *to_buf++ = *from_buf++;
  114. +     nbytes--;
  115. +     }
  116. +   return(to_buf);
  117. + }
  118. + #endif        /* atarist */
  119.   
  120.   int
  121.   main (argc, argv)
  122. ***************
  123. *** 1021,1026 ****
  124. --- 1057,1068 ----
  125.     /* Target-name to write with the dependency information.  */
  126.     char *deps_target = 0;
  127.   
  128. + #ifdef atarist
  129. + #define GCC_INCLUDE_DIR "./"
  130. + /* turn this on if you are going to set the TOS 1.4 dont clear heap flag */
  131. + /*  _malloczero(1); */     /* zero mallocs by default */
  132. + #endif  
  133.   #ifdef RLIMIT_STACK
  134.     /* Get rid of any avoidable limit on stack size.  */
  135.     {
  136. ***************
  137. *** 1343,1352 ****
  138. --- 1385,1400 ----
  139.       break;
  140.   
  141.         case 'v':
  142. + #if (defined(atarist) || defined(CROSSATARI) || defined(atariminix))
  143. + #include "PatchLev.h"
  144. +     fprintf (stderr, "GNU CPP-atariST version %s Patchlevel %s",
  145. +          version_string, PatchLevel);
  146. + #else
  147.       fprintf (stderr, "GNU CPP version %s", version_string);
  148.   #ifdef TARGET_VERSION
  149.       TARGET_VERSION;
  150.   #endif
  151. + #endif
  152.       fprintf (stderr, "\n");
  153.       verbose = 1;
  154.       break;
  155. ***************
  156. *** 1480,1485 ****
  157. --- 1528,1534 ----
  158.       }
  159.     }
  160.   
  161. + #if (!(defined(atarist) || defined(CROSSATARI) || defined(atariminix)))
  162.     /* Add dirs from CPATH after dirs from -I.  */
  163.     /* There seems to be confusion about what CPATH should do,
  164.        so for the moment it is not documented.  */
  165. ***************
  166. *** 1489,1494 ****
  167. --- 1538,1544 ----
  168.     p = (char *) getenv ("CPATH");
  169.     if (p != 0 && ! no_standard_includes)
  170.       path_include (p);
  171. + #endif
  172.   
  173.     /* Now that dollars_in_ident is known, initialize is_idchar.  */
  174.     initialize_char_syntax ();
  175. ***************
  176. *** 1607,1614 ****
  177.     { /* read the appropriate environment variable and if it exists
  178.          replace include_defaults with the listed path. */
  179.       char *epath = 0;
  180.       switch ((objc << 1) + cplusplus)
  181. !       {
  182.         case 0:
  183.       epath = getenv ("C_INCLUDE_PATH");
  184.       break;
  185. --- 1657,1712 ----
  186.     { /* read the appropriate environment variable and if it exists
  187.          replace include_defaults with the listed path. */
  188.       char *epath = 0;
  189. + #if (defined(atarist) || defined(CROSSATARI) || defined(atariminix))
  190. +     int db_hack = 0;
  191. +     char *e1 = getenv("GNUINC"), *e2 = getenv("GNULIB"),
  192. +          *e3 = getenv("GXXINC");
  193. +     /* Get length of the alloc'ed array. (Yeah I know, I might alloc
  194. +      * a character more than I need but who cares...
  195. +      */
  196. +     if (cplusplus && e3)
  197. +     db_hack += strlen (e3);
  198. +     if (e1)
  199. +         db_hack += strlen (e1) + 1;
  200. +     if (e2)
  201. +         db_hack += strlen (e1) + 1;
  202. +     if (db_hack) {
  203. +     epath = alloca (db_hack + 1);
  204. +     *epath = '\0';
  205. +     db_hack = 0;
  206. +     /* Concatenate the paths together. */
  207. +     if (cplusplus && e3) {
  208. +         strcpy (epath, e3);
  209. +         db_hack = 1;
  210. +     }
  211. +     if (e1) {
  212. +         if (db_hack) {
  213. +         strcat (epath, PATH_SEP_STR);
  214. +         }
  215. +         strcat (epath, e1);
  216. +         db_hack = 1;
  217. +     }
  218. +     if (e2) {
  219. +         if (db_hack) {
  220. +         strcat (epath, PATH_SEP_STR);
  221. +         }
  222. +         strcat (epath, e2);
  223. +     }
  224. +     }
  225. + #ifdef atarist
  226. +     if (epath)
  227. +         for (e3=epath; *e3; e3++)    /* Use one kind of path separator */
  228. +         if (*e3 == ';')
  229. +         *e3 = PATH_SEPARATOR;
  230. + #endif
  231. + #else
  232.       switch ((objc << 1) + cplusplus)
  233. !     {
  234.         case 0:
  235.       epath = getenv ("C_INCLUDE_PATH");
  236.       break;
  237. ***************
  238. *** 1621,1627 ****
  239.         case 3:
  240.       epath = getenv ("OBJCPLUS_INCLUDE_PATH");
  241.       break;
  242. !       }
  243.       /* If the environment var for this language is set,
  244.          add to the default list of include directories.  */
  245.       if (epath) {
  246. --- 1719,1727 ----
  247.         case 3:
  248.       epath = getenv ("OBJCPLUS_INCLUDE_PATH");
  249.       break;
  250. !     }
  251. ! #endif
  252.       /* If the environment var for this language is set,
  253.          add to the default list of include directories.  */
  254.       if (epath) {
  255. ***************
  256. *** 1675,1687 ****
  257. --- 1775,1797 ----
  258.     if (!no_standard_includes) {
  259.       struct default_include *p = include_defaults;
  260.       char *specd_prefix = include_prefix;
  261. + #ifdef GCC_INCLUDE_DIR
  262.       char *default_prefix = savestring (GCC_INCLUDE_DIR);
  263. + #else
  264. +     char *default_prefix = savestring ("./");
  265. + #endif
  266.       int default_len = 0;
  267.       /* Remove the `include' from /usr/local/lib/gcc.../include.  */
  268.       if (!strcmp (default_prefix + strlen (default_prefix) - 8, "/include")) {
  269.         default_len = strlen (default_prefix) - 7;
  270.         default_prefix[default_len] = 0;
  271.       }
  272. + #ifdef atarist
  273. +     else if (!strcmp (default_prefix + strlen (default_prefix) - 8, "\\include")) {
  274. +       default_len = strlen (default_prefix) - 7;
  275. +       default_prefix[default_len] = 0;
  276. +     }
  277. + #endif
  278.       /* Search "translated" versions of GNU directories.
  279.          These have /usr/local/lib/gcc... replaced by specd_prefix.  */
  280.       if (specd_prefix != 0 && default_len != 0)
  281. ***************
  282. *** 1823,1829 ****
  283. --- 1933,1943 ----
  284.         char *p1 = p;
  285.         /* Discard all directory prefixes from P.  */
  286.         while (*p1) {
  287. + #ifdef atarist
  288. +     if ((*p1 == '/') || (*p1 == '\\'))
  289. + #else
  290.       if (*p1 == '/')
  291. + #endif
  292.         p = p1 + 1;
  293.       p1++;
  294.         }
  295. ***************
  296. *** 1997,2002 ****
  297. --- 2111,2117 ----
  298.     return 0;
  299.   }
  300.   
  301. + #if (!(defined(atarist) || defined(CROSSATARI) || defined(atariminix)))
  302.   /* Given a colon-separated list of file names PATH,
  303.      add all the names to the search path for include files.  */
  304.   
  305. ***************
  306. *** 2044,2049 ****
  307. --- 2159,2165 ----
  308.         p++;
  309.       }
  310.   }
  311. + #endif /* atarist */
  312.   
  313.   /* Pre-C-Preprocessor to translate ANSI trigraph idiocy in BUF
  314.      before main CCCP processing.  Name `pcp' is also in honor of the
  315. ***************
  316. *** 3230,3235 ****
  317. --- 3346,3352 ----
  318.     assertions_flag = save_assertions_flag;
  319.     return obuf;
  320.   }
  321. + /* #endif */
  322.   
  323.   /*
  324.    * Process a # directive.  Expects IP->bufp to point after the '#', as in
  325. ***************
  326. *** 3692,3699 ****
  327. --- 3809,3825 ----
  328.   
  329.         if (string)
  330.       {
  331. + #ifndef atarist
  332.         buf = (char *) alloca (3 + 4 * strlen (string));
  333.         quote_string (buf, string);
  334. + #else
  335. +           buf = (char *) alloca (16 + strlen (string));
  336. +           {
  337. +           char *tbuf = (char *) alloca (16 + strlen (string));
  338. +           (void) slashifying_bcopy(string, tbuf, strlen(string)+1);
  339. +           sprintf (buf, "\"%s\"", tbuf);
  340. +           }
  341. + #endif /* atarist */
  342.       }
  343.         else
  344.       buf = "\"\"";
  345. ***************
  346. *** 3929,3935 ****
  347. --- 4055,4066 ----
  348.           dsp[0].next = search_start;
  349.           search_start = dsp;
  350.   #ifndef VMS
  351. + #ifdef atarist
  352. +         if((ep = rindex(nam, '\\')) == NULL)
  353. +         ep = rindex(nam, '/');
  354. + #else
  355.           ep = rindex (nam, '/');
  356. + #endif
  357.   #else                /* VMS */
  358.           ep = rindex (nam, ']');
  359.           if (ep == NULL) ep = rindex (nam, '>');
  360. ***************
  361. *** 4009,4017 ****
  362. --- 4140,4162 ----
  363.   
  364.     /* If specified file name is absolute, just open it.  */
  365.   
  366. + #ifdef atarist
  367. +   if ((*fbeg == '\\') || (*fbeg == '/')) {
  368. +     if(fbeg[2] == ':')
  369. +     { /* allow "\D:\xxx" */
  370. +         strncpy (fname, fbeg+1, flen-1);
  371. +         fname[flen-1] = 0;
  372. +     }
  373. +     else
  374. +     {  /* allow "\lib\xxx" == "\currentdrive:\lib\xxx" */
  375. +         strncpy (fname, fbeg, flen);
  376. +         fname[flen] = 0;
  377. +     }
  378. + #else
  379.     if (*fbeg == '/') {
  380.       strncpy (fname, fbeg, flen);
  381.       fname[flen] = 0;
  382. + #endif
  383.       if (redundant_include_p (fname))
  384.         return 0;
  385.       if (importing)
  386. ***************
  387. *** 4032,4038 ****
  388. --- 4177,4187 ----
  389.       if (searchptr->fname[0] == 0)
  390.         continue;
  391.       strcpy (fname, searchptr->fname);
  392. + #ifdef atarist
  393. +     strcat (fname, "\\");
  394. + #else
  395.       strcat (fname, "/");
  396. + #endif
  397.       fname[strlen (fname) + flen] = 0;
  398.         } else {
  399.       fname[0] = 0;
  400. ***************
  401. *** 4145,4161 ****
  402.   
  403.       if (!no_precomp)
  404.         do {
  405.       sprintf (pcftry, "%s%d", fname, pcfnum++);
  406.       
  407.       pcf = open (pcftry, O_RDONLY, 0666);
  408.       if (pcf != -1)
  409.         {
  410.           struct stat s;
  411.   
  412.           fstat (pcf, &s);
  413.           if (bcmp (&stat_f.st_ino, &s.st_ino, sizeof (s.st_ino))
  414.           || stat_f.st_dev != s.st_dev)
  415. !           {
  416.           pcfbuf = check_precompiled (pcf, fname, &pcfbuflimit);
  417.           /* Don't need it any more.  */
  418.           close (pcf);
  419. --- 4294,4352 ----
  420.   
  421.       if (!no_precomp)
  422.         do {
  423. + #ifdef atarist
  424. +     int numlen;
  425. +     char *dot;
  426. +     char *slash;
  427. +     /* cut extension to 3 chars and dont depend on UNIXMODE           */
  428. +     /* this will have to be done when saving precompiled headers, too */
  429. +     /* but as far as I tried, they dont work up to now, anyway   (AL) */
  430. +       if( pcfnum>=100 )     numlen=3;
  431. +       else if( pcfnum>=10 ) numlen=2;
  432. +       else                  numlen=1;
  433. +       dot=strrchr( fname, '.' );
  434. +       if( (slash=strrchr( fname, '/')) && slash>dot )
  435. +         dot=NULL;
  436. +       else
  437. +       if( (slash=strrchr( fname, '\\')) && slash>dot )
  438. +         dot=NULL;
  439. +       if( dot ) {
  440. +         if( strlen(dot)-1>3-numlen ) {
  441. +           sprintf(pcftry, "%.*s%d", strlen(fname)-(strlen(dot)-(4-numlen)),
  442. +                   fname, pcfnum++);
  443. +         } else {
  444. +           sprintf(pcftry, "%s%d", fname, pcfnum++);
  445. +         }
  446. +       } else {
  447. +         sprintf( pcftry, "%s.%d", fname, pcfnum++);
  448. +       }
  449. + #else    /* looks like we got a sane filesystem */
  450.       sprintf (pcftry, "%s%d", fname, pcfnum++);
  451. + #endif
  452. + #if 0
  453. +     fprintf ( stderr, "trying precompiled file %s.\n", pcftry );
  454. + #endif
  455.       
  456.       pcf = open (pcftry, O_RDONLY, 0666);
  457.       if (pcf != -1)
  458.         {
  459. + #ifndef atarist
  460. +         /* dont bother with this on the ST since these field are faked
  461. +          * anyways
  462. +              */
  463.           struct stat s;
  464.   
  465.           fstat (pcf, &s);
  466.           if (bcmp (&stat_f.st_ino, &s.st_ino, sizeof (s.st_ino))
  467.           || stat_f.st_dev != s.st_dev)
  468. ! #else
  469. !         if (1)
  470. ! #endif
  471. !               {
  472.           pcfbuf = check_precompiled (pcf, fname, &pcfbuflimit);
  473.           /* Don't need it any more.  */
  474.           close (pcf);
  475. ***************
  476. *** 7130,7137 ****
  477. --- 7321,7332 ----
  478.     check_expand (op, len + 1);
  479.     if (op->bufp > op->buf && op->bufp[-1] != '\n')
  480.       *op->bufp++ = '\n';
  481. + #ifdef atarist
  482. +   op->bufp = slashifying_bcopy (line_cmd_buf, op->bufp, len);
  483. + #else
  484.     bcopy (line_cmd_buf, op->bufp, len);
  485.     op->bufp += len;
  486. + #endif
  487.     op->lineno = ip->lineno;
  488.   }
  489.   
  490. ***************
  491. *** 8879,8884 ****
  492. --- 9074,9080 ----
  493.     deps_buffer[deps_size] = 0;
  494.   }
  495.   
  496. + #if (!(defined(atarist) || defined(atariminix)))
  497.   #if defined(USG) || defined(VMS)
  498.   #ifndef BSTRING
  499.   
  500. ***************
  501. *** 8915,8921 ****
  502.   }
  503.   #endif /* not BSTRING */
  504.   #endif /* USG or VMS */
  505.   
  506.   static void
  507.   fatal (str, arg)
  508. --- 9111,9117 ----
  509.   }
  510.   #endif /* not BSTRING */
  511.   #endif /* USG or VMS */
  512. ! #endif /* any atari */
  513.   
  514.   static void
  515.   fatal (str, arg)
  516. diff -rc gcc-2.5.0/config/m68k/m68k.c /net/acae127/home/bammi/usr2/gcc/config/m68k/m68k.c
  517. *** gcc-2.5.0/config/m68k/m68k.c    Thu Oct 21 00:26:37 1993
  518. --- /net/acae127/home/bammi/usr2/gcc/config/m68k/m68k.c    Tue Oct 26 08:23:15 1993
  519. ***************
  520. *** 61,67 ****
  521.   void
  522.   finalize_pic ()
  523.   {
  524. !   if (flag_pic && current_function_uses_pic_offset_table)
  525.       emit_insn (gen_rtx (USE, VOIDmode, pic_offset_table_rtx));
  526.   }
  527.   
  528. --- 61,67 ----
  529.   void
  530.   finalize_pic ()
  531.   {
  532. !   if (flag_pic && flag_pic < 3 && current_function_uses_pic_offset_table)
  533.       emit_insn (gen_rtx (USE, VOIDmode, pic_offset_table_rtx));
  534.   }
  535.   
  536. ***************
  537. *** 214,220 ****
  538.         asm_fprintf (stream, "\tmoveml %0I0x%x,%Rsp@-\n", mask);
  539.   #endif
  540.       }
  541. !   if (flag_pic && current_function_uses_pic_offset_table)
  542.       {
  543.   #ifdef MOTOROLA
  544.         asm_fprintf (stream, "\t%Olea (%Rpc, %U_GLOBAL_OFFSET_TABLE_@GOTPC), %s\n",
  545. --- 214,220 ----
  546.         asm_fprintf (stream, "\tmoveml %0I0x%x,%Rsp@-\n", mask);
  547.   #endif
  548.       }
  549. !   if (flag_pic && flag_pic < 3 && current_function_uses_pic_offset_table)
  550.       {
  551.   #ifdef MOTOROLA
  552.         asm_fprintf (stream, "\t%Olea (%Rpc, %U_GLOBAL_OFFSET_TABLE_@GOTPC), %s\n",
  553. ***************
  554. *** 801,812 ****
  555.     /* First handle a simple SYMBOL_REF or LABEL_REF */
  556.     if (GET_CODE (orig) == SYMBOL_REF || GET_CODE (orig) == LABEL_REF)
  557.       {
  558.         if (reg == 0)
  559.       abort ();
  560.   
  561. !       pic_ref = gen_rtx (MEM, Pmode,
  562. !              gen_rtx (PLUS, Pmode,
  563. !                   pic_offset_table_rtx, orig));
  564.         current_function_uses_pic_offset_table = 1;
  565.         RTX_UNCHANGING_P (pic_ref) = 1;
  566.         emit_move_insn (reg, pic_ref);
  567. --- 801,820 ----
  568.     /* First handle a simple SYMBOL_REF or LABEL_REF */
  569.     if (GET_CODE (orig) == SYMBOL_REF || GET_CODE (orig) == LABEL_REF)
  570.       {
  571. + #ifdef LEGITIMATE_BASEREL_OPERAND_P
  572. +       if (LEGITIMATE_BASEREL_OPERAND_P (orig))
  573. +     return orig;
  574. + #endif
  575.         if (reg == 0)
  576.       abort ();
  577.   
  578. !       if (flag_pic == 3)
  579. !         pic_ref = gen_rtx (PLUS, Pmode, pic_offset_table_rtx, orig);
  580. !       else
  581. !         pic_ref = gen_rtx (MEM, Pmode,
  582. !                gen_rtx (PLUS, Pmode,
  583. !                     pic_offset_table_rtx, orig));
  584.         current_function_uses_pic_offset_table = 1;
  585.         RTX_UNCHANGING_P (pic_ref) = 1;
  586.         emit_move_insn (reg, pic_ref);
  587. ***************
  588. *** 1851,1856 ****
  589. --- 1859,1867 ----
  590.         output_address (XEXP (op, 0));
  591.         if (letter == 'd' && ! TARGET_68020
  592.         && CONSTANT_ADDRESS_P (XEXP (op, 0))
  593. +       && !(TARGET_PC_REL && GET_CODE (XEXP (op, 0)) == SYMBOL_REF
  594. +            && SYMBOL_REF_FLAG (XEXP (op, 0))
  595. +            && !SYMBOL_REF_USED (XEXP (op, 0)))
  596.         && !(GET_CODE (XEXP (op, 0)) == CONST_INT
  597.              && INTVAL (XEXP (op, 0)) < 0x8000
  598.              && INTVAL (XEXP (op, 0)) >= -0x8000))
  599. ***************
  600. *** 2158,2163 ****
  601. --- 2169,2176 ----
  602.                 fprintf (file, ":w");
  603.               if ((flag_pic == 2) && (breg == pic_offset_table_rtx))
  604.                 fprintf (file, ":l");
  605. +             if ((flag_pic == 3) && (breg == pic_offset_table_rtx))
  606. +               fprintf (file, ":w");
  607.             }
  608.           if (addr != 0 && ireg != 0)
  609.             {
  610. ***************
  611. *** 2235,2240 ****
  612. --- 2248,2265 ----
  613.           fprintf (file, "%d:w", INTVAL (addr));
  614.   #endif
  615.         }
  616. +     else if (TARGET_PC_REL && GET_CODE (addr) == SYMBOL_REF
  617. +          && SYMBOL_REF_FLAG (addr) && !SYMBOL_REF_USED (addr))
  618. +       {
  619. + #ifdef MOTOROLA
  620. +         output_addr_const (file, addr);
  621. +         fputs ("(pc)", file);
  622. + #else
  623. +         fputs ("pc@(", file);
  624. +         output_addr_const (file, addr);
  625. +         putc (')', file);
  626. + #endif
  627. +       }
  628.       else
  629.         {
  630.           output_addr_const (file, addr);
  631. ***************
  632. *** 2301,2303 ****
  633. --- 2326,2344 ----
  634.   
  635.     return 0;
  636.   }
  637. + #ifdef ENCODE_SECTION_INFO
  638. + /* Does operand (which is a symbolic_operand) live in text space? If
  639. +    so SYMBOL_REF_FLAG, which is set by ENCODE_SECTION_INFO, will be true.*/
  640. + int
  641. + read_only_operand (operand)
  642. +      rtx operand;
  643. + {
  644. +   if (GET_CODE (operand) == CONST)
  645. +     operand = XEXP (XEXP (operand, 0), 0);
  646. +   if (GET_CODE (operand) == SYMBOL_REF)
  647. +     return SYMBOL_REF_FLAG (operand) || CONSTANT_POOL_ADDRESS_P (operand);
  648. +   return 1;
  649. + }
  650. + #endif
  651. diff -rc gcc-2.5.0/config/m68k/m68k.h /net/acae127/home/bammi/usr2/gcc/config/m68k/m68k.h
  652. *** gcc-2.5.0/config/m68k/m68k.h    Tue Sep 21 22:40:16 1993
  653. --- /net/acae127/home/bammi/usr2/gcc/config/m68k/m68k.h    Tue Oct 26 08:23:16 1993
  654. ***************
  655. *** 92,97 ****
  656. --- 92,103 ----
  657.   /* Use the 68040-only fp instructions (-m68040).  */
  658.   #define TARGET_68040_ONLY (target_flags & 01000)
  659.   
  660. + /* Use PC-relative addressing for refs to read-only data */
  661. + #define TARGET_PC_REL (target_flags & 02000)
  662. + /* Use base-relative addressing for refs to data&bss segments */
  663. + #define TARGET_BASE_REL (target_flags & 04000)
  664.   /* Macro to define tables used to set the flags.
  665.      This is a list in braces of pairs in braces,
  666.      each pair being { "NAME", VALUE }
  667. ***************
  668. *** 121,126 ****
  669. --- 127,136 ----
  670.       { "68030", -01400},                \
  671.       { "68030", 5},                \
  672.       { "68040", 01007},                \
  673. +     { "pcrel", 02000},                \
  674. +     { "nopcrel", -02000},            \
  675. +     { "baserel", 04000},            \
  676. +     { "nobaserel", -04000},            \
  677.       { "68851", 0},    /* Affects *_SPEC and/or GAS.  */    \
  678.       { "no-68851", 0},    /* Affects *_SPEC and/or GAS.  */    \
  679.       { "68302", 0},    /* Affects *_SPEC and/or GAS.  */    \
  680. ***************
  681. *** 143,154 ****
  682. --- 153,166 ----
  683.     if (! TARGET_68020 && flag_pic == 2)    \
  684.       error("-fPIC is not currently supported on the 68000 or 68010\n");    \
  685.     SUBTARGET_OVERRIDE_OPTIONS        \
  686. +   if (TARGET_BASE_REL) flag_pic = 3;    \
  687.   }
  688.   #else
  689.   #define OVERRIDE_OPTIONS        \
  690.   {                    \
  691.     if (! TARGET_68020 && flag_pic == 2)    \
  692.       error("-fPIC is not currently supported on the 68000 or 68010\n");    \
  693. +   if (TARGET_BASE_REL) flag_pic = 3;    \
  694.     SUBTARGET_OVERRIDE_OPTIONS        \
  695.   }
  696.   #endif /* defined SUPPORT_SUN_FPA */
  697. ***************
  698. *** 356,361 ****
  699. --- 368,376 ----
  700.   {                                               \
  701.     if (flag_pic)                                 \
  702.       fixed_regs[PIC_OFFSET_TABLE_REGNUM] = 1;    \
  703. +   /* prevent saving/restoring of the base reg */ \
  704. +   if (flag_pic == 3)                 \
  705. +     call_used_regs[PIC_OFFSET_TABLE_REGNUM] = 1; \
  706.   }
  707.   
  708.   #else /* defined SUPPORT_SUN_FPA */
  709. ***************
  710. *** 380,385 ****
  711. --- 395,403 ----
  712.       }                         \
  713.     if (flag_pic)                                 \
  714.       fixed_regs[PIC_OFFSET_TABLE_REGNUM] = 1;    \
  715. +   /* prevent saving/restoring of the base reg */ \
  716. +   if (flag_pic == 3)                 \
  717. +     call_used_regs[PIC_OFFSET_TABLE_REGNUM] = 1; \
  718.   }
  719.   
  720.   #endif /* defined SUPPORT_SUN_FPA */
  721. ***************
  722. *** 1154,1159 ****
  723. --- 1172,1179 ----
  724.          && LEGITIMATE_BASE_REG_P (XEXP (X, 0))                \
  725.          && GET_CODE (XEXP (X, 1)) == CONST_INT                \
  726.          && ((unsigned) INTVAL (XEXP (X, 1)) + 0x8000) < 0x10000)        \
  727. +    || (GET_CODE (X) == PLUS && XEXP (X, 0) == pic_offset_table_rtx     \
  728. +        && flag_pic == 3 && CONSTANT_ADDRESS_P (XEXP (X, 1)))        \
  729.      || (GET_CODE (X) == PLUS && XEXP (X, 0) == pic_offset_table_rtx     \
  730.          && flag_pic && GET_CODE (XEXP (X, 1)) == SYMBOL_REF)        \
  731.      || (GET_CODE (X) == PLUS && XEXP (X, 0) == pic_offset_table_rtx     \
  732. diff -rc gcc-2.5.0/config/m68k/m68k.md /net/acae127/home/bammi/usr2/gcc/config/m68k/m68k.md
  733. *** gcc-2.5.0/config/m68k/m68k.md    Wed Oct 20 23:59:47 1993
  734. --- /net/acae127/home/bammi/usr2/gcc/config/m68k/m68k.md    Tue Oct 26 08:23:18 1993
  735. ***************
  736. *** 704,716 ****
  737.   {
  738.     if (flag_pic && symbolic_operand (operands[1], SImode)) 
  739.       {
  740. !       /* The source is an address which requires PIC relocation.  
  741. !          Call legitimize_pic_address with the source, mode, and a relocation
  742. !          register (a new pseudo, or the final destination if reload_in_progress
  743. !          is set).   Then fall through normally */
  744. !       extern rtx legitimize_pic_address();
  745. !       rtx temp = reload_in_progress ? operands[0] : gen_reg_rtx (Pmode);
  746. !       operands[1] = legitimize_pic_address (operands[1], SImode, temp);
  747.       }
  748.   }")
  749.   
  750. --- 704,721 ----
  751.   {
  752.     if (flag_pic && symbolic_operand (operands[1], SImode)) 
  753.       {
  754. ! #ifdef LEGITIMATE_BASEREL_OPERAND_P
  755. !       if (flag_pic != 3 || !LEGITIMATE_BASEREL_OPERAND_P (operands[1]))
  756. ! #endif
  757. !       {
  758. !         /* The source is an address which requires PIC relocation.  
  759. !            Call legitimize_pic_address with the source, mode, and a relocation
  760. !            register (a new pseudo, or the final destination if reload_in_progress
  761. !            is set).   Then fall through normally */
  762. !         extern rtx legitimize_pic_address();
  763. !         rtx temp = reload_in_progress ? operands[0] : gen_reg_rtx (Pmode);
  764. !         operands[1] = legitimize_pic_address (operands[1], SImode, temp);
  765. !       }
  766.       }
  767.   }")
  768.   
  769. ***************
  770. *** 4823,4829 ****
  771.     ""
  772.     "
  773.   {
  774. !   if (flag_pic && GET_CODE (XEXP (operands[0], 0)) == SYMBOL_REF)
  775.   #ifdef MOTOROLA
  776.       SYMBOL_REF_FLAG (XEXP (operands[0], 0)) = 1;
  777.   #else
  778. --- 4828,4834 ----
  779.     ""
  780.     "
  781.   {
  782. !   if (flag_pic && flag_pic < 3 && GET_CODE (XEXP (operands[0], 0)) == SYMBOL_REF)
  783.   #ifdef MOTOROLA
  784.       SYMBOL_REF_FLAG (XEXP (operands[0], 0)) = 1;
  785.   #else
  786. ***************
  787. *** 4838,4844 ****
  788.        (match_operand:SI 1 "general_operand" "g"))]
  789.     ;; Operand 1 not really used on the m68000.
  790.   
  791. !   "! flag_pic"
  792.     "*
  793.   #ifdef MOTOROLA
  794.     return \"jsr %0\";
  795. --- 4843,4849 ----
  796.        (match_operand:SI 1 "general_operand" "g"))]
  797.     ;; Operand 1 not really used on the m68000.
  798.   
  799. !   "(! flag_pic || flag_pic == 3)"
  800.     "*
  801.   #ifdef MOTOROLA
  802.     return \"jsr %0\";
  803. ***************
  804. *** 4853,4859 ****
  805.        (match_operand:SI 1 "general_operand" "g"))]
  806.     ;; Operand 1 not really used on the m68000.
  807.   
  808. !   "flag_pic"
  809.     "*
  810.   #ifdef HPUX_ASM
  811.     return \"bsr %0\";
  812. --- 4858,4864 ----
  813.        (match_operand:SI 1 "general_operand" "g"))]
  814.     ;; Operand 1 not really used on the m68000.
  815.   
  816. !   "(flag_pic && flag_pic < 3)"
  817.     "*
  818.   #ifdef HPUX_ASM
  819.     return \"bsr %0\";
  820. ***************
  821. *** 4878,4884 ****
  822.     ""
  823.     "
  824.   {
  825. !   if (flag_pic && GET_CODE (XEXP (operands[1], 0)) == SYMBOL_REF)
  826.   #ifdef MOTOROLA
  827.       SYMBOL_REF_FLAG (XEXP (operands[1], 0)) = 1;
  828.   #else
  829. --- 4883,4889 ----
  830.     ""
  831.     "
  832.   {
  833. !   if (flag_pic && flag_pic < 3 && GET_CODE (XEXP (operands[1], 0)) == SYMBOL_REF)
  834.   #ifdef MOTOROLA
  835.       SYMBOL_REF_FLAG (XEXP (operands[1], 0)) = 1;
  836.   #else
  837. ***************
  838. *** 4893,4899 ****
  839.       (call (match_operand:QI 1 "memory_operand" "o")
  840.             (match_operand:SI 2 "general_operand" "g")))]
  841.     ;; Operand 2 not really used on the m68000.
  842. !   "! flag_pic"
  843.     "*
  844.   #ifdef MOTOROLA
  845.     return \"jsr %1\";
  846. --- 4898,4904 ----
  847.       (call (match_operand:QI 1 "memory_operand" "o")
  848.             (match_operand:SI 2 "general_operand" "g")))]
  849.     ;; Operand 2 not really used on the m68000.
  850. !   "(! flag_pic || flag_pic == 3)"
  851.     "*
  852.   #ifdef MOTOROLA
  853.     return \"jsr %1\";
  854. ***************
  855. *** 4908,4914 ****
  856.       (call (match_operand:QI 1 "memory_operand" "o")
  857.             (match_operand:SI 2 "general_operand" "g")))]
  858.     ;; Operand 2 not really used on the m68000.
  859. !   "flag_pic"
  860.     "*
  861.   #ifdef HPUX_ASM
  862.     return \"bsr %1\";
  863. --- 4913,4919 ----
  864.       (call (match_operand:QI 1 "memory_operand" "o")
  865.             (match_operand:SI 2 "general_operand" "g")))]
  866.     ;; Operand 2 not really used on the m68000.
  867. !   "(flag_pic && flag_pic < 3)"
  868.     "*
  869.   #ifdef HPUX_ASM
  870.     return \"bsr %1\";
  871. diff -rc gcc-2.5.0/cp-lex.c /net/acae127/home/bammi/usr2/gcc/cp-lex.c
  872. *** gcc-2.5.0/cp-lex.c    Fri Oct  8 15:01:12 1993
  873. --- /net/acae127/home/bammi/usr2/gcc/cp-lex.c    Tue Oct 26 08:25:12 1993
  874. ***************
  875. *** 1744,1750 ****
  876.     {
  877.       struct pending_inline *t;
  878.   
  879. !     t = (struct pending_inline *) obstack_alloc (&inline_text_obstack,
  880.                            sizeof (struct pending_inline));
  881.       t->lineno = lineno;
  882.       t->filename = input_filename;
  883. --- 1744,1750 ----
  884.     {
  885.       struct pending_inline *t;
  886.   
  887. !     t = (struct pending_inline *) obstack_alloc (&permanent_obstack,
  888.                            sizeof (struct pending_inline));
  889.       t->lineno = lineno;
  890.       t->filename = input_filename;
  891. diff -rc gcc-2.5.0/cp-tree.c /net/acae127/home/bammi/usr2/gcc/cp-tree.c
  892. *** gcc-2.5.0/cp-tree.c    Fri Oct  8 15:02:05 1993
  893. --- /net/acae127/home/bammi/usr2/gcc/cp-tree.c    Tue Oct 26 08:25:22 1993
  894. ***************
  895. *** 1660,1665 ****
  896. --- 1660,1666 ----
  897.     print_class_statistics ();
  898.   }
  899.   
  900. + #ifndef atarist
  901.   /* This is used by the `assert' macro.  It is provided in libgcc.a,
  902.      which `cc' doesn't know how to link.  Note that the C++ front-end
  903.      no longer actually uses the `assert' macro (instead, it calls
  904. ***************
  905. *** 1682,1687 ****
  906. --- 1683,1689 ----
  907.     fflush (stderr);
  908.     abort ();
  909.   }
  910. + #endif
  911.   
  912.   /* Return, as an INTEGER_CST node, the number of elements for
  913.      TYPE (which is an ARRAY_TYPE).  This counts only elements of the top array. */
  914. diff -rc gcc-2.5.0/gcc.c /net/acae127/home/bammi/usr2/gcc/gcc.c
  915. *** gcc-2.5.0/gcc.c    Wed Oct 20 19:12:52 1993
  916. --- /net/acae127/home/bammi/usr2/gcc/gcc.c    Tue Oct 26 19:32:43 1993
  917. ***************
  918. *** 30,35 ****
  919. --- 30,44 ----
  920.   Once it knows which kind of compilation to perform, the procedure for
  921.   compilation is specified by a string called a "spec".  */
  922.   
  923. + #ifdef CROSSATARI
  924. + #ifdef atarist
  925. + #undef atarist
  926. + #endif
  927. + #ifdef atariminix
  928. + #undef atariminix
  929. + #endif
  930. + #endif
  931. +   
  932.   #include <sys/types.h>
  933.   #include <ctype.h>
  934.   #include <signal.h>
  935. ***************
  936. *** 40,45 ****
  937. --- 49,56 ----
  938.   #include "obstack.h"
  939.   #include "gvarargs.h"
  940.   #include <stdio.h>
  941. + #include <string.h>
  942. +     /* if your supplier still does'nt have string.h, shoot him.. */
  943.   
  944.   #ifndef R_OK
  945.   #define R_OK 4
  946. ***************
  947. *** 65,71 ****
  948.   #define NULL_PTR ((GENERIC_PTR)0)
  949.   #endif
  950.   
  951. ! #ifdef USG
  952.   #define vfork fork
  953.   #endif /* USG */
  954.   
  955. --- 76,82 ----
  956.   #define NULL_PTR ((GENERIC_PTR)0)
  957.   #endif
  958.   
  959. ! #if (defined(USG) || defined(atariminix))
  960.   #define vfork fork
  961.   #endif /* USG */
  962.   
  963. ***************
  964. *** 97,102 ****
  965. --- 108,124 ----
  966.   #define PATH_SEPARATOR ':'
  967.   #endif
  968.   
  969. + #ifdef CROSSATARI
  970. + #include <ctype.h>
  971. + #endif
  972. + #ifdef atarist
  973. + #include <osbind.h>
  974. + #include <ctype.h>
  975. + #include <fcntl.h>        /* fgth, for redirection of stderr */
  976. + long _stksize = 8192;
  977. + #endif
  978.   #define obstack_chunk_alloc xmalloc
  979.   #define obstack_chunk_free free
  980.   
  981. ***************
  982. *** 161,167 ****
  983. --- 183,191 ----
  984.      pass the compiler in building the list of pointers to constructors
  985.      and destructors.  */
  986.   
  987. + #if (!(defined(CROSSATARI) || defined(atarist)))
  988.   static struct obstack collect_obstack;
  989. + #endif
  990.   
  991.   extern char *version_string;
  992.   
  993. ***************
  994. *** 457,463 ****
  995.              %{aux-info*}\
  996.              %{pg:%{fomit-frame-pointer:%e-pg and -fomit-frame-pointer are incompatible}}\
  997.              %{S:%W{o*}%{!o*:-o %b.s}}%{!S:-o %{|!pipe:%g.s}} |\n\
  998. !               %{!S:as %{R} %{j} %{J} %{h} %{d2} %a %Y\
  999.                 %{c:%W{o*}%{!o*:-o %w%b.o}}%{!c:-o %d%w%u.o}\
  1000.                         %{!pipe:%g.s} %A\n }}}}"},
  1001.     {"-",
  1002. --- 481,487 ----
  1003.              %{aux-info*}\
  1004.              %{pg:%{fomit-frame-pointer:%e-pg and -fomit-frame-pointer are incompatible}}\
  1005.              %{S:%W{o*}%{!o*:-o %b.s}}%{!S:-o %{|!pipe:%g.s}} |\n\
  1006. !               %{!S:as %{v} %{R} %{j} %{J} %{h} %{d2} %a %Y\
  1007.                 %{c:%W{o*}%{!o*:-o %w%b.o}}%{!c:-o %d%w%u.o}\
  1008.                         %{!pipe:%g.s} %A\n }}}}"},
  1009.     {"-",
  1010. ***************
  1011. *** 490,496 ****
  1012.              %{aux-info*}\
  1013.              %{pg:%{fomit-frame-pointer:%e-pg and -fomit-frame-pointer are incompatible}}\
  1014.              %{S:%W{o*}%{!o*:-o %b.s}}%{!S:-o %{|!pipe:%g.s}} |\n\
  1015. !               %{!S:as %{R} %{j} %{J} %{h} %{d2} %a %Y\
  1016.                 %{c:%W{o*}%{!o*:-o %w%b.o}}%{!c:-o %d%w%u.o}\
  1017.                         %{!pipe:%g.s} %A\n }}}}"},
  1018.     {".h", "@c-header"},
  1019. --- 514,520 ----
  1020.              %{aux-info*}\
  1021.              %{pg:%{fomit-frame-pointer:%e-pg and -fomit-frame-pointer are incompatible}}\
  1022.              %{S:%W{o*}%{!o*:-o %b.s}}%{!S:-o %{|!pipe:%g.s}} |\n\
  1023. !               %{!S:as %{v} %{R} %{j} %{J} %{h} %{d2} %a %Y\
  1024.                 %{c:%W{o*}%{!o*:-o %w%b.o}}%{!c:-o %d%w%u.o}\
  1025.                         %{!pipe:%g.s} %A\n }}}}"},
  1026.     {".h", "@c-header"},
  1027. ***************
  1028. *** 525,531 ****
  1029.              %{aux-info*}\
  1030.              %{pg:%{fomit-frame-pointer:%e-pg and -fomit-frame-pointer are incompatible}}\
  1031.              %{S:%W{o*}%{!o*:-o %b.s}}%{!S:-o %{|!pipe:%g.s}} |\n\
  1032. !               %{!S:as %{R} %{j} %{J} %{h} %{d2} %a %Y\
  1033.                 %{c:%W{o*}%{!o*:-o %w%b.o}}%{!c:-o %d%w%u.o}\
  1034.                         %{!pipe:%g.s} %A\n }}}}"},
  1035.     {".i", "@cpp-output"},
  1036. --- 549,555 ----
  1037.              %{aux-info*}\
  1038.              %{pg:%{fomit-frame-pointer:%e-pg and -fomit-frame-pointer are incompatible}}\
  1039.              %{S:%W{o*}%{!o*:-o %b.s}}%{!S:-o %{|!pipe:%g.s}} |\n\
  1040. !               %{!S:as %{v} %{R} %{j} %{J} %{h} %{d2} %a %Y\
  1041.                 %{c:%W{o*}%{!o*:-o %w%b.o}}%{!c:-o %d%w%u.o}\
  1042.                         %{!pipe:%g.s} %A\n }}}}"},
  1043.     {".i", "@cpp-output"},
  1044. ***************
  1045. *** 536,542 ****
  1046.       %{aux-info*}\
  1047.       %{pg:%{fomit-frame-pointer:%e-pg and -fomit-frame-pointer are incompatible}}\
  1048.       %{S:%W{o*}%{!o*:-o %b.s}}%{!S:-o %{|!pipe:%g.s}} |\n\
  1049. !     %{!S:as %{R} %{j} %{J} %{h} %{d2} %a %Y\
  1050.               %{c:%W{o*}%{!o*:-o %w%b.o}}%{!c:-o %d%w%u.o} %{!pipe:%g.s} %A\n }"},
  1051.     {".ii", "@c++-cpp-output"},
  1052.     {"@c++-cpp-output",
  1053. --- 560,566 ----
  1054.       %{aux-info*}\
  1055.       %{pg:%{fomit-frame-pointer:%e-pg and -fomit-frame-pointer are incompatible}}\
  1056.       %{S:%W{o*}%{!o*:-o %b.s}}%{!S:-o %{|!pipe:%g.s}} |\n\
  1057. !     %{!S:as %{v} %{R} %{j} %{J} %{h} %{d2} %a %Y\
  1058.               %{c:%W{o*}%{!o*:-o %w%b.o}}%{!c:-o %d%w%u.o} %{!pipe:%g.s} %A\n }"},
  1059.     {".ii", "@c++-cpp-output"},
  1060.     {"@c++-cpp-output",
  1061. ***************
  1062. *** 546,559 ****
  1063.           %{aux-info*}\
  1064.           %{pg:%{fomit-frame-pointer:%e-pg and -fomit-frame-pointer are incompatible}}\
  1065.           %{S:%W{o*}%{!o*:-o %b.s}}%{!S:-o %{|!pipe:%g.s}} |\n\
  1066. !        %{!S:as %{R} %{j} %{J} %{h} %{d2} %a %Y\
  1067.              %{c:%W{o*}%{!o*:-o %w%b.o}}%{!c:-o %d%w%u.o}\
  1068.              %{!pipe:%g.s} %A\n }"},
  1069.     {".s", "@assembler"},
  1070.     {"@assembler",
  1071. !    "%{!S:as %{R} %{j} %{J} %{h} %{d2} %a %Y\
  1072.               %{c:%W{o*}%{!o*:-o %w%b.o}}%{!c:-o %d%w%u.o} %i %A\n }"},
  1073.     {".S", "@assembler-with-cpp"},
  1074.     {"@assembler-with-cpp",
  1075.      "cpp -lang-asm %{nostdinc*} %{C} %{v} %{A*} %{I*} %{P} %I\
  1076.       %{C:%{!E:%eGNU C does not support -C without using -E}}\
  1077. --- 570,586 ----
  1078.           %{aux-info*}\
  1079.           %{pg:%{fomit-frame-pointer:%e-pg and -fomit-frame-pointer are incompatible}}\
  1080.           %{S:%W{o*}%{!o*:-o %b.s}}%{!S:-o %{|!pipe:%g.s}} |\n\
  1081. !        %{!S:as %{v} %{R} %{j} %{J} %{h} %{d2} %a %Y\
  1082.              %{c:%W{o*}%{!o*:-o %w%b.o}}%{!c:-o %d%w%u.o}\
  1083.              %{!pipe:%g.s} %A\n }"},
  1084.     {".s", "@assembler"},
  1085.     {"@assembler",
  1086. !    "%{!S:as %{v} %{R} %{j} %{J} %{h} %{d2} %a %Y\
  1087.               %{c:%W{o*}%{!o*:-o %w%b.o}}%{!c:-o %d%w%u.o} %i %A\n }"},
  1088.     {".S", "@assembler-with-cpp"},
  1089. +   {".ss", "@assembler-with-cpp"},
  1090. +   {".cpp", "@assembler-with-cpp"},
  1091. +   {".spp", "@assembler-with-cpp"},
  1092.     {"@assembler-with-cpp",
  1093.      "cpp -lang-asm %{nostdinc*} %{C} %{v} %{A*} %{I*} %{P} %I\
  1094.       %{C:%{!E:%eGNU C does not support -C without using -E}}\
  1095. ***************
  1096. *** 563,569 ****
  1097.           %{traditional-cpp:-traditional}\
  1098.       %{g*} %{W*} %{w} %{pedantic*} %{H} %{d*} %C %{D*} %{U*} %{i*}\
  1099.           %i %{!M:%{!MM:%{!E:%{!pipe:%g.s}}}}%{E:%W{o*}}%{M:%W{o*}}%{MM:%W{o*}} |\n",
  1100. !    "%{!M:%{!MM:%{!E:%{!S:as %{R} %{j} %{J} %{h} %{d2} %a %Y\
  1101.                       %{c:%W{o*}%{!o*:-o %w%b.o}}%{!c:-o %d%w%u.o}\
  1102.               %{!pipe:%g.s} %A\n }}}}"},
  1103.     {".ads", "@ada"},
  1104. --- 590,596 ----
  1105.           %{traditional-cpp:-traditional}\
  1106.       %{g*} %{W*} %{w} %{pedantic*} %{H} %{d*} %C %{D*} %{U*} %{i*}\
  1107.           %i %{!M:%{!MM:%{!E:%{!pipe:%g.s}}}}%{E:%W{o*}}%{M:%W{o*}}%{MM:%W{o*}} |\n",
  1108. !    "%{!M:%{!MM:%{!E:%{!S:as %{v} %{R} %{j} %{J} %{h} %{d2} %a %Y\
  1109.                       %{c:%W{o*}%{!o*:-o %w%b.o}}%{!c:-o %d%w%u.o}\
  1110.               %{!pipe:%g.s} %A\n }}}}"},
  1111.     {".ads", "@ada"},
  1112. ***************
  1113. *** 589,594 ****
  1114. --- 616,630 ----
  1115.   
  1116.   /* Here is the spec for running the linker, after compiling all files.  */
  1117.   
  1118. + #if (defined(CROSSATARI) || defined(atarist) || defined(atariminix))
  1119. + static char *link_command_spec = 
  1120. +  "%{!fsyntax-only: \
  1121. +     %{!c:%{!M*:%{!E:%{!S:ld %X %{v} %{G} %{o*} %l\
  1122. +       %{A} %{d} %{e*} %{N} %{n} %{r} %{s} %{S} %{T*} %{t} %{u*} %{X} %{x} %{z}\
  1123. +       %{y*} %{!nostdlib:%S} \
  1124. +       %{L*} %o %{!nostdlib:%s %L}\n }}}}}";
  1125. + #else
  1126.   /* -u* was put back because both BSD and SysV seem to support it.  */
  1127.   /* %{static:} simply prevents an error message if the target machine
  1128.      doesn't handle -static.  */
  1129. ***************
  1130. *** 622,627 ****
  1131. --- 658,664 ----
  1132.               %{L*} %D %{T*} %o %{!nostdlib:-lgcc %L -lgcc %{!A:%E}}\n }}}}}}";
  1133.   #endif
  1134.   #endif
  1135. + #endif
  1136.   
  1137.   /* A vector of options to give to the linker.
  1138.      These options are accumulated by -Xlinker and -Wl,
  1139. ***************
  1140. *** 849,854 ****
  1141. --- 886,892 ----
  1142.     *argcp = newindex;
  1143.   }
  1144.   
  1145. + #if (!(defined(atarist) || defined(CROSSATARI) || defined(atariminix)))
  1146.   /* Read compilation specs from a file named FILENAME,
  1147.      replacing the default ones.
  1148.   
  1149. ***************
  1150. *** 988,993 ****
  1151. --- 1026,1032 ----
  1152.   
  1153.     return p;
  1154.   }
  1155. + #endif /* ataris */
  1156.   
  1157.   /* Structure to keep track of the specs that have been defined so far.  These
  1158.      are accessed using %(specname) or %[specname] in a compiler or link spec. */
  1159. ***************
  1160. *** 1104,1109 ****
  1161. --- 1143,1155 ----
  1162.   /* Name with which this program was invoked.  */
  1163.   
  1164.   static char *programname;
  1165. + #ifdef atarist
  1166. + /* Flag indicating, that stderr should be redirected for the child
  1167. +    processes */
  1168. + unsigned char zflag;
  1169. + #endif
  1170.   
  1171.   /* Structures to keep track of prefixes to try when looking for files. */
  1172.   
  1173. ***************
  1174. *** 1397,1406 ****
  1175.     if (base == (char *)0)
  1176.       base = "./";
  1177.   
  1178.     len = strlen (base);
  1179.     temp_filename = xmalloc (len + sizeof("/ccXXXXXX") + 1);
  1180.     strcpy (temp_filename, base);
  1181. !   if (len > 0 && temp_filename[len-1] != '/')
  1182.       temp_filename[len++] = '/';
  1183.     strcpy (temp_filename + len, "ccXXXXXX");
  1184.   
  1185. --- 1443,1463 ----
  1186.     if (base == (char *)0)
  1187.       base = "./";
  1188.   
  1189. + #ifdef atarist
  1190. +   {
  1191. +       char *newbase = alloca(FILENAME_MAX);
  1192. +       dos2unx(base,newbase);
  1193. +       base = newbase;
  1194. +   }
  1195. + #endif
  1196.     len = strlen (base);
  1197.     temp_filename = xmalloc (len + sizeof("/ccXXXXXX") + 1);
  1198.     strcpy (temp_filename, base);
  1199. !   if (len > 0 && (temp_filename[len-1] != '/' 
  1200. ! #ifdef atarist
  1201. !           || temp_filename[len-1] != '\\'
  1202. ! #endif
  1203. !            ))
  1204.       temp_filename[len++] = '/';
  1205.     strcpy (temp_filename + len, "ccXXXXXX");
  1206.   
  1207. ***************
  1208. *** 1419,1424 ****
  1209. --- 1476,1482 ----
  1210.      use come from an obstack, we don't have to worry about allocating
  1211.      space for them.  */
  1212.   
  1213. + #if (!(defined(CROSSATARI) || defined(atarist)))
  1214.   #ifndef HAVE_PUTENV
  1215.   
  1216.   void
  1217. ***************
  1218. *** 1520,1525 ****
  1219. --- 1578,1584 ----
  1220.     obstack_1grow (&collect_obstack, '\0');
  1221.     putenv (obstack_finish (&collect_obstack));
  1222.   }
  1223. + #endif /* ataris */
  1224.   
  1225.   
  1226.   /* Search for NAME using the prefix list PREFIXES.  MODE is passed to
  1227. ***************
  1228. *** 1804,1809 ****
  1229. --- 1863,1869 ----
  1230.   
  1231.   #else /* not __MSDOS__ */
  1232.   
  1233. + #ifndef atarist
  1234.   static int
  1235.   pexecute (search_flag, program, argv, not_last)
  1236.        int search_flag;
  1237. ***************
  1238. *** 1892,1897 ****
  1239. --- 1952,1958 ----
  1240.       }
  1241.   }
  1242.   
  1243. + #endif /* not atarist */
  1244.   #endif /* not __MSDOS__ */
  1245.   #else /* not OS2 */
  1246.   
  1247. ***************
  1248. *** 1922,1937 ****
  1249.       {
  1250.         char *prog;        /* program name.  */
  1251.         char **argv;        /* vector of args.  */
  1252.         int pid;            /* pid of process for this command.  */
  1253.       };
  1254.   
  1255.     struct command *commands;    /* each command buffer with above info.  */
  1256.   
  1257.     /* Count # of piped commands.  */
  1258.     for (n_commands = 1, i = 0; i < argbuf_index; i++)
  1259.       if (strcmp (argbuf[i], "|") == 0)
  1260.         n_commands++;
  1261.     /* Get storage for each command.  */
  1262.     commands
  1263.       = (struct command *) alloca (n_commands * sizeof (struct command));
  1264. --- 1983,2003 ----
  1265.       {
  1266.         char *prog;        /* program name.  */
  1267.         char **argv;        /* vector of args.  */
  1268. + #ifndef atarist
  1269.         int pid;            /* pid of process for this command.  */
  1270. + #endif
  1271.       };
  1272.   
  1273.     struct command *commands;    /* each command buffer with above info.  */
  1274.   
  1275. + #ifndef atarist
  1276.     /* Count # of piped commands.  */
  1277.     for (n_commands = 1, i = 0; i < argbuf_index; i++)
  1278.       if (strcmp (argbuf[i], "|") == 0)
  1279.         n_commands++;
  1280. ! #else
  1281. !   n_commands = 1;
  1282. ! #endif
  1283.     /* Get storage for each command.  */
  1284.     commands
  1285.       = (struct command *) alloca (n_commands * sizeof (struct command));
  1286. ***************
  1287. *** 1946,1951 ****
  1288. --- 2012,2018 ----
  1289.     if (string)
  1290.       commands[0].argv[0] = string;
  1291.   
  1292. + #ifndef atarist
  1293.     for (n_commands = 1, i = 0; i < argbuf_index; i++)
  1294.       if (strcmp (argbuf[i], "|") == 0)
  1295.         {                /* each command.  */
  1296. ***************
  1297. *** 1960,1965 ****
  1298. --- 2027,2035 ----
  1299.         commands[n_commands].argv[0] = string;
  1300.       n_commands++;
  1301.         }
  1302. + #else
  1303. +   n_commands = 1;
  1304. + #endif
  1305.   
  1306.     argbuf[argbuf_index] = 0;
  1307.   
  1308. ***************
  1309. *** 1975,1983 ****
  1310. --- 2045,2055 ----
  1311.         for (j = commands[i].argv; *j; j++)
  1312.           fprintf (stderr, " %s", *j);
  1313.   
  1314. + #ifndef atarist
  1315.         /* Print a pipe symbol after all but the last command.  */
  1316.         if (i + 1 != n_commands)
  1317.           fprintf (stderr, " |");
  1318. + #endif
  1319.         fprintf (stderr, "\n");
  1320.       }
  1321.         fflush (stderr);
  1322. ***************
  1323. *** 1992,2008 ****
  1324. --- 2064,2090 ----
  1325.   #endif /* DEBUG */
  1326.       }
  1327.   
  1328. + #ifndef atarist
  1329.     /* Run each piped subprocess.  */
  1330.   
  1331.     last_pipe_input = STDIN_FILE_NO;
  1332.     for (i = 0; i < n_commands; i++)
  1333.       {
  1334. + #ifndef atariminix
  1335.         char *string = commands[i].argv[0];
  1336.   
  1337.         commands[i].pid = pexecute (string != commands[i].prog,
  1338.                     string, commands[i].argv,
  1339.                     i + 1 < n_commands);
  1340.   
  1341. + #else
  1342. +       extern int execv();
  1343. +       char *string = commands[i].argv[0];
  1344. +       commands[i].pid = pexecute (execv,
  1345. +                   string, commands[i].argv,
  1346. +                   i + 1 < n_commands);
  1347. + #endif
  1348.         if (string != commands[i].prog)
  1349.       free (string);
  1350.       }
  1351. ***************
  1352. *** 2049,2054 ****
  1353. --- 2131,2181 ----
  1354.         }
  1355.       return ret_code;
  1356.     }
  1357. + #else /* atarist */
  1358. +  {
  1359. +      register int iii;
  1360. +      int errfd, oldfd;
  1361. +      char **j;
  1362. +      execution_count++;
  1363. +      if (zflag)
  1364. +        {
  1365. +      errfd = Fopen("compile.err", 2);
  1366. +      if (errfd < __SMALLEST_VALID_HANDLE)
  1367. +        errfd = Fcreate("compile.err", 0);
  1368. +      else
  1369. +        Fseek(0L, errfd, 2);
  1370. +      if (errfd >= __SMALLEST_VALID_HANDLE)
  1371. +        {
  1372. +          oldfd = Fdup (2);
  1373. +          Fforce(2, errfd);
  1374. +        }
  1375. +      else
  1376. +        {
  1377. +          error("cannot open %s", "compile.err");
  1378. +          zflag = 0;        /* no redirection */
  1379. +        }
  1380. +        }
  1381. +      for (i = 0; i < n_commands ; i++)
  1382. +      {
  1383. +          j = commands[i].argv;
  1384. +          iii = spawnve(0, j[0], j, NULL);
  1385. +      if(iii != 0)
  1386. +          break;
  1387. +      }
  1388. +      if (zflag)
  1389. +        {
  1390. +      Fforce(2, oldfd);
  1391. +      Fclose(oldfd);
  1392. +      Fclose(errfd);
  1393. +        }
  1394. +      if (iii != 0)
  1395. +        return -1;
  1396. +      else
  1397. +        return 0;
  1398. +  }
  1399. + #endif /* atarist */  
  1400.   }
  1401.   
  1402.   /* Find all the switches given to us
  1403. ***************
  1404. *** 2112,2117 ****
  1405. --- 2239,2245 ----
  1406.   
  1407.     /* Set up the default search paths.  */
  1408.   
  1409. + #ifndef CROSSATARI
  1410.     if (gcc_exec_prefix)
  1411.       {
  1412.         add_prefix (&exec_prefix, gcc_exec_prefix, 0, 0, NULL_PTR);
  1413. ***************
  1414. *** 2186,2191 ****
  1415. --- 2314,2320 ----
  1416.           endp++;
  1417.       }
  1418.       }
  1419. + #endif /* CROSSATARI */
  1420.   
  1421.     /* Use LPATH like LIBRARY_PATH (for the CMU build program).  */
  1422.     temp = getenv ("LPATH");
  1423. ***************
  1424. *** 2394,2399 ****
  1425. --- 2523,2534 ----
  1426.             n_switches++;
  1427.             break;
  1428.           }
  1429. + #ifdef atarist
  1430. +         case 'z':    /* redirect stderr to a file */
  1431. +           zflag++;
  1432. +           n_switches++;
  1433. +           break;
  1434. + #endif
  1435.           default:
  1436.             n_switches++;
  1437.   
  1438. ***************
  1439. *** 2413,2423 ****
  1440. --- 2548,2569 ----
  1441.        (such as cpp) rather than those of the host system.  */
  1442.     /* Use 2 as fourth arg meaning try just the machine as a suffix,
  1443.        as well as trying the machine and the version.  */
  1444. + #if (defined(atarist) || defined(CROSSATARI) || defined(WEIRD))
  1445. + /* NB defined(WEIRD) should not really be there, its only for my weird setup */
  1446. +   /* We are not using machine_suffix here, so do not make */
  1447. +   /* these prefixes available only when we have one       */
  1448. +   add_prefix (&exec_prefix, standard_exec_prefix, 0, 0, NULL_PTR);
  1449. +   add_prefix (&exec_prefix, standard_exec_prefix_1, 0, 0, NULL_PTR);
  1450. +   add_prefix (&startfile_prefix, standard_exec_prefix, 0, 0, NULL_PTR);
  1451. +   add_prefix (&startfile_prefix, standard_exec_prefix_1, 0, 0, NULL_PTR);
  1452. + #else
  1453.     add_prefix (&exec_prefix, standard_exec_prefix, 0, 2, NULL_PTR);
  1454.     add_prefix (&exec_prefix, standard_exec_prefix_1, 0, 2, NULL_PTR);
  1455.   
  1456.     add_prefix (&startfile_prefix, standard_exec_prefix, 0, 1, NULL_PTR);
  1457.     add_prefix (&startfile_prefix, standard_exec_prefix_1, 0, 1, NULL_PTR);
  1458. + #endif /* (defined(atarist) || defined(CROSSATARI)) */
  1459.   
  1460.     tooldir_prefix = concat (tooldir_base_prefix, spec_machine, "/");
  1461.   
  1462. ***************
  1463. *** 2637,2642 ****
  1464. --- 2783,2797 ----
  1465.   /* Nonzero means that the input of this command is coming from a pipe.  */
  1466.   static int input_from_pipe;
  1467.   
  1468. + #ifdef atarist
  1469. + /* I don't know why this is necessary.  Recursive calls to do_spec_1
  1470. +    end up ignoring the error code from calls to execute().  That causes
  1471. +    do_spec to get a 0 return value, and do_spec_1("\n"), which causes the
  1472. +    command to get executed again.
  1473. + */
  1474. + int execute_return_error = 0;
  1475. + #endif
  1476.   /* Process the spec SPEC and run the commands specified therein.
  1477.      Returns 0 if the spec is successfully processed; -1 if failed.  */
  1478.   
  1479. ***************
  1480. *** 2657,2666 ****
  1481. --- 2812,2830 ----
  1482.   
  1483.     /* Force out any unfinished command.
  1484.        If -pipe, this forces out the last command if it ended in `|'.  */
  1485. + #ifdef atarist
  1486. +   if (!value && execute_return_error)
  1487. +     {
  1488. +     value = execute_return_error;
  1489. +     execute_return_error = 0;
  1490. +     }
  1491. + #endif
  1492.     if (value == 0)
  1493.       {
  1494. + #ifndef atarist
  1495.         if (argbuf_index > 0 && !strcmp (argbuf[argbuf_index - 1], "|"))
  1496.       argbuf_index--;
  1497. + #endif
  1498.   
  1499.         if (argbuf_index > 0)
  1500.       value = execute ();
  1501. ***************
  1502. *** 2698,2703 ****
  1503. --- 2862,2918 ----
  1504.          Otherwise, NL, SPC, TAB and % are special.  */
  1505.       switch (inswitch ? 'a' : c)
  1506.         {
  1507. + #if (defined(atarist) || defined(CROSSATARI))
  1508. + /* this stuff added by jrd.  if see '$', expect name of env var, delimited
  1509. +    by '$'.  Find it's value, and subst it in.
  1510. +    modified by ERS to only collect things that look like names; this
  1511. +    saves e.g. the -$ arg. to cpp from getting munged */
  1512. +       case '$':
  1513. +       {
  1514. +     char varname[32];        /* should be enough */
  1515. +     char * value;            /* deciphered value string */
  1516. +     char *temp;
  1517. +     int i;
  1518. +     extern char *getenv();
  1519. +     
  1520. +     for (i = 0 ; ((c = *p) != '$') && isalnum(c) && i < 31 ; i++, p++)
  1521. +         varname[i] = c;
  1522. +     varname[i] = '\0';
  1523. +     if (strlen(varname) > 0) /* ++jrb fix */
  1524. +     {
  1525. +                  ++p;    /* skip trailing '$' */
  1526. +         value = getenv(varname); /* ++jrb fix */
  1527. +         if (value)
  1528. +         { /* if value is a path, only consider 1'st component */
  1529. + #ifdef atarist
  1530. +             if((temp = index(value, ',')) == NULL)
  1531. +                 temp = index(value, ';');
  1532. + #else
  1533. +             temp = index(value, ':');
  1534. + #endif
  1535. +             if(temp != NULL)
  1536. +             {
  1537. +                 char *t = (char *) alloca(strlen(value) + 1);
  1538. +                 strcpy(t, value);
  1539. +                 t[temp-value] = '\0';
  1540. +                 do_spec_1(t, 0);
  1541. +             }
  1542. +             else
  1543. +                 do_spec_1(value, 0);
  1544. +         }
  1545. +             else
  1546. +             do_spec_1(".", 0);    /* a compleat kludge... */
  1547. +     }
  1548. +         else
  1549. +         {
  1550. +              obstack_1grow(&obstack, '$');
  1551. +              arg_going = 1;
  1552. +         }
  1553. +       }
  1554. +      break;
  1555. + #endif /* atarist */
  1556.         case '\n':
  1557.       /* End of line: finish any pending argument,
  1558.          then run the pending command if one has been started.  */
  1559. ***************
  1560. *** 2736,2741 ****
  1561. --- 2951,2960 ----
  1562.       if (argbuf_index > 0)
  1563.         {
  1564.           value = execute ();
  1565. + #ifdef atarist
  1566. +         if (!execute_return_error)
  1567. +             execute_return_error = value;
  1568. + #endif
  1569.           if (value)
  1570.             return value;
  1571.         }
  1572. ***************
  1573. *** 3351,3363 ****
  1574. --- 3570,3590 ----
  1575.           break;
  1576.   
  1577.         default:
  1578. + #if 1 /* atarist */
  1579. +         fprintf(stderr, "Bogus char '%c' found at pos %d of spec '%s'\n",
  1580. +         c, (p - spec - 1), spec);
  1581. + #endif
  1582.           abort ();
  1583.         }
  1584.       break;
  1585.   
  1586. + #ifndef atarist
  1587. +       /* on the atari it is important to preserve backslash in spec */
  1588. +       /* so just let it go into default case */
  1589.         case '\\':
  1590.       /* Backslash: treat next character as ordinary.  */
  1591.       c = *p++;
  1592. + #endif
  1593.   
  1594.       /* fall through */
  1595.         default:
  1596. ***************
  1597. *** 3634,3639 ****
  1598. --- 3861,3867 ----
  1599.   
  1600.   /* On fatal signals, delete all the temporary files.  */
  1601.   
  1602. + #ifndef atarist
  1603.   static void
  1604.   fatal_error (signum)
  1605.        int signum;
  1606. ***************
  1607. *** 3645,3650 ****
  1608. --- 3873,3879 ----
  1609.        so its normal effect occurs.  */
  1610.     kill (getpid (), signum);
  1611.   }
  1612. + #endif
  1613.   
  1614.   int
  1615.   main (argc, argv)
  1616. ***************
  1617. *** 3659,3664 ****
  1618. --- 3888,3898 ----
  1619.     char *specs_file;
  1620.     char *p;
  1621.   
  1622. + #ifdef atarist
  1623. + /* turn this on if you are going to set the TOS 1.4 dont clear heap flag */
  1624. + /*  _malloczero(1); */     /* zero mallocs by default */
  1625. +   programname = "gcc";
  1626. + #else  
  1627.     p = argv[0] + strlen (argv[0]);
  1628.     while (p != argv[0] && p[-1] != '/') --p;
  1629.     programname = p;
  1630. ***************
  1631. *** 3675,3686 ****
  1632. --- 3909,3922 ----
  1633.     if (signal (SIGPIPE, SIG_IGN) != SIG_IGN)
  1634.       signal (SIGPIPE, fatal_error);
  1635.   #endif
  1636. + #endif /* atarist */
  1637.   
  1638.     argbuf_length = 10;
  1639.     argbuf = (char **) xmalloc (argbuf_length * sizeof (char *));
  1640.   
  1641.     obstack_init (&obstack);
  1642.   
  1643. + #if (!(defined(atarist) || defined(CROSSATARI)))
  1644.     /* Set up to remember the pathname of gcc and any options
  1645.        needed for collect.  We use argv[0] instead of programname because
  1646.        we need the complete pathname.  */
  1647. ***************
  1648. *** 3688,3693 ****
  1649. --- 3924,3930 ----
  1650.     obstack_grow (&collect_obstack, "COLLECT_GCC=", sizeof ("COLLECT_GCC=")-1);
  1651.     obstack_grow (&collect_obstack, argv[0], strlen (argv[0])+1);
  1652.     putenv (obstack_finish (&collect_obstack));
  1653. + #endif
  1654.   
  1655.     /* Choose directory for temp files.  */
  1656.   
  1657. ***************
  1658. *** 3699,3704 ****
  1659. --- 3936,3950 ----
  1660.   
  1661.     process_command (argc, argv);
  1662.   
  1663. + #if (defined(atarist) || defined(CROSSATARI))
  1664. +   {
  1665. +     char *temp;
  1666. +     
  1667. +     if((temp = getenv ("GCCEXEC")))
  1668. +     add_prefix (&exec_prefix, temp, 0, 0, 0);
  1669. +   }
  1670. + #endif
  1671. +   
  1672.     /* Initialize the vector of specs to just the default.
  1673.        This means one element containing 0s, as a terminator.  */
  1674.   
  1675. ***************
  1676. *** 3706,3711 ****
  1677. --- 3952,3961 ----
  1678.     bcopy (default_compilers, compilers, sizeof default_compilers);
  1679.     n_compilers = n_default_compilers;
  1680.   
  1681. + #if (defined(atarist) || defined(CROSSATARI) || defined(atariminix))
  1682. +   specs_file = 0;
  1683. + #else
  1684.     /* Read specs from a file if there is one.  */
  1685.   
  1686.     machine_suffix = concat (spec_machine, "/", concat (spec_version, "/", ""));
  1687. ***************
  1688. *** 3715,3720 ****
  1689. --- 3965,3971 ----
  1690.     /* Read the specs file unless it is a default one.  */
  1691.     if (specs_file != 0 && strcmp (specs_file, "specs"))
  1692.       read_specs (specs_file);
  1693. + #endif
  1694.   
  1695.     /* If not cross-compiling, look for startfiles in the standard places.  */
  1696.     /* The fact that these are done here, after reading the specs file,
  1697. ***************
  1698. *** 3752,3758 ****
  1699.               0, 0, NULL_PTR);
  1700.         add_prefix (&startfile_prefix,
  1701.                 concat (standard_exec_prefix,
  1702. !                   machine_suffix,
  1703.                     standard_startfile_prefix),
  1704.                 0, 0, NULL_PTR);
  1705.       }               
  1706. --- 4003,4009 ----
  1707.               0, 0, NULL_PTR);
  1708.         add_prefix (&startfile_prefix,
  1709.                 concat (standard_exec_prefix,
  1710. !                   (machine_suffix)? machine_suffix : "",
  1711.                     standard_startfile_prefix),
  1712.                 0, 0, NULL_PTR);
  1713.       }               
  1714. ***************
  1715. *** 3787,3793 ****
  1716. --- 4038,4050 ----
  1717.   
  1718.     if (verbose_flag)
  1719.       {
  1720. + #if (defined(atarist) || defined(CROSSATARI) || defined(atariminix))
  1721. + #include "PatchLev.h"
  1722. +       fprintf (stderr, "gcc-atariST version %s Patchlevel %s\n",
  1723. +            version_string, PatchLevel);
  1724. + #else
  1725.         fprintf (stderr, "gcc version %s\n", version_string);
  1726. + #endif
  1727.         if (n_infiles == 0)
  1728.       exit (0);
  1729.       }
  1730. ***************
  1731. *** 3835,3841 ****
  1732. --- 4092,4103 ----
  1733.   
  1734.         input_basename = input_filename;
  1735.         for (p = input_filename; *p; p++)
  1736. + #ifdef atarist
  1737. +         if (((*p == '/') || (*p == '\\')) && (*(p-1) != ':'))
  1738. +             /* allow both '\' and '/' with  our new lib */
  1739. + #else
  1740.           if (*p == '/')
  1741. + #endif
  1742.             input_basename = p + 1;
  1743.   
  1744.         /* Find a suffix starting with the last period,
  1745. ***************
  1746. *** 3898,3903 ****
  1747. --- 4160,4166 ----
  1748.         int i;
  1749.         int first_time;
  1750.   
  1751. + #if (!(defined(atarist) || defined(CROSSATARI)))
  1752.         /* Rebuild the COMPILER_PATH and LIBRARY_PATH environment variables
  1753.        for collect.  */
  1754.         putenv_from_prefixes (&exec_prefix, "COMPILER_PATH=");
  1755. ***************
  1756. *** 3928,3933 ****
  1757. --- 4191,4197 ----
  1758.       }
  1759.         obstack_grow (&collect_obstack, "\0", 1);
  1760.         putenv (obstack_finish (&collect_obstack));
  1761. + #endif
  1762.   
  1763.         value = do_spec (link_command_spec);
  1764.         if (value < 0)
  1765. diff -rc gcc-2.5.0/getpwd.c /net/acae127/home/bammi/usr2/gcc/getpwd.c
  1766. *** gcc-2.5.0/getpwd.c    Tue Sep 21 17:35:41 1993
  1767. --- /net/acae127/home/bammi/usr2/gcc/getpwd.c    Fri May 21 08:35:37 1993
  1768. ***************
  1769. *** 14,20 ****
  1770.      BSD systems) now provides getcwd as called for by POSIX.  Allow for
  1771.      the few exceptions to the general rule here.  */
  1772.   
  1773. ! #if !(defined (POSIX) || defined (USG) || defined (VMS))
  1774.   #include <sys/param.h>
  1775.   extern char *getwd ();
  1776.   #define getcwd(buf,len) getwd(buf)
  1777. --- 14,20 ----
  1778.      BSD systems) now provides getcwd as called for by POSIX.  Allow for
  1779.      the few exceptions to the general rule here.  */
  1780.   
  1781. ! #if !(defined (POSIX) || defined (USG) || defined (VMS) || defined(atarist) || defined(CROSSHPUX))
  1782.   #include <sys/param.h>
  1783.   extern char *getwd ();
  1784.   #define getcwd(buf,len) getwd(buf)
  1785. ***************
  1786. *** 48,58 ****
  1787.     if (!p && !(errno = failure_errno))
  1788.       {
  1789.         if (! ((p = getenv ("PWD")) != 0
  1790.            && *p == '/'
  1791.            && stat (p, &pwdstat) == 0
  1792.            && stat (".", &dotstat) == 0
  1793.            && dotstat.st_ino == pwdstat.st_ino
  1794. !          && dotstat.st_dev == pwdstat.st_dev))
  1795.   
  1796.       /* The shortcut didn't work.  Try the slow, ``sure'' way.  */
  1797.       for (s = GUESSPATHLEN;  ! getcwd (p = xmalloc (s), s);  s *= 2)
  1798. --- 48,61 ----
  1799.     if (!p && !(errno = failure_errno))
  1800.       {
  1801.         if (! ((p = getenv ("PWD")) != 0
  1802. + #ifndef atarist
  1803.            && *p == '/'
  1804.            && stat (p, &pwdstat) == 0
  1805.            && stat (".", &dotstat) == 0
  1806.            && dotstat.st_ino == pwdstat.st_ino
  1807. !          && dotstat.st_dev == pwdstat.st_dev
  1808. ! #endif
  1809. !          ))
  1810.   
  1811.       /* The shortcut didn't work.  Try the slow, ``sure'' way.  */
  1812.       for (s = GUESSPATHLEN;  ! getcwd (p = xmalloc (s), s);  s *= 2)
  1813. diff -rc gcc-2.5.0/toplev.c /net/acae127/home/bammi/usr2/gcc/toplev.c
  1814. *** gcc-2.5.0/toplev.c    Wed Oct 20 17:14:48 1993
  1815. --- /net/acae127/home/bammi/usr2/gcc/toplev.c    Tue Oct 26 12:27:33 1993
  1816. ***************
  1817. *** 31,37 ****
  1818.   
  1819.   #include <sys/stat.h>
  1820.   
  1821. ! #ifdef USG
  1822.   #undef FLOAT
  1823.   #include <sys/param.h>
  1824.   /* This is for hpux.  It is a real screw.  They should change hpux.  */
  1825. --- 31,37 ----
  1826.   
  1827.   #include <sys/stat.h>
  1828.   
  1829. ! #if defined(USG) || defined(CROSSHPUX)
  1830.   #undef FLOAT
  1831.   #include <sys/param.h>
  1832.   /* This is for hpux.  It is a real screw.  They should change hpux.  */
  1833. ***************
  1834. *** 41,49 ****
  1835. --- 41,57 ----
  1836.   #undef FFS  /* Some systems define this in param.h.  */
  1837.   #else
  1838.   #ifndef VMS
  1839. + #if (!(defined(atarist) || defined(atariminix)))
  1840.   #include <sys/time.h>
  1841.   #include <sys/resource.h>
  1842. + #endif /* !(atarist || atariminix) */
  1843. + #endif
  1844.   #endif
  1845. + #ifdef atariminix
  1846. + #include <sys/times.h>
  1847. + /* #include <minix/const.h>, avoid dragging this in */
  1848. + #define HZ 60    /* this is the only thing needed from minix/const.h */
  1849.   #endif
  1850.   
  1851.   #include "input.h"
  1852. ***************
  1853. *** 61,66 ****
  1854. --- 69,79 ----
  1855.   #include "bytecode.h"
  1856.   #include "bc-emit.h"
  1857.   
  1858. + #ifdef atarist
  1859. + long _stksize = -1L;    /* for all sizes of ST's */
  1860. +     /* -1 means malloc from own heap and keep all  of memory */
  1861. + #endif /* atarist */
  1862.   #ifdef VMS
  1863.   /* The extra parameters substantially improve the I/O performance.  */
  1864.   static FILE *
  1865. ***************
  1866. *** 791,797 ****
  1867.   int
  1868.   get_run_time ()
  1869.   {
  1870. ! #ifdef USG
  1871.     struct tms tms;
  1872.   #else
  1873.   #ifndef VMS
  1874. --- 804,813 ----
  1875.   int
  1876.   get_run_time ()
  1877.   {
  1878. ! #ifdef atarist
  1879. !   long now;
  1880. ! #else
  1881. ! #if (defined(USG) || defined(atariminix) || defined(CROSSHPUX))
  1882.     struct tms tms;
  1883.   #else
  1884.   #ifndef VMS
  1885. ***************
  1886. *** 806,816 ****
  1887.       } vms_times;
  1888.   #endif
  1889.   #endif
  1890.   
  1891.     if (quiet_flag)
  1892.       return 0;
  1893.   
  1894. ! #ifdef USG
  1895.     times (&tms);
  1896.     return (tms.tms_utime + tms.tms_stime) * (1000000 / HZ);
  1897.   #else
  1898. --- 822,836 ----
  1899.       } vms_times;
  1900.   #endif
  1901.   #endif
  1902. + #endif
  1903.   
  1904.     if (quiet_flag)
  1905.       return 0;
  1906.   
  1907. ! #ifdef atarist
  1908. !   return(time(NULL) * 1000000);
  1909. ! #else
  1910. ! #if (defined(USG) || defined(atariminix) || defined(CROSSHPUX))
  1911.     times (&tms);
  1912.     return (tms.tms_utime + tms.tms_stime) * (1000000 / HZ);
  1913.   #else
  1914. ***************
  1915. *** 823,828 ****
  1916. --- 843,849 ----
  1917.     return (vms_times.proc_user_time + vms_times.proc_system_time) * 10000;
  1918.   #endif
  1919.   #endif
  1920. + #endif
  1921.   }
  1922.   
  1923.   #define TIMEVAR(VAR, BODY)    \
  1924. ***************
  1925. *** 1460,1465 ****
  1926. --- 1481,1487 ----
  1927.     longjmp (float_handler, 1);
  1928.   }
  1929.   
  1930. + #ifndef atarist
  1931.   /* Handler for SIGPIPE.  */
  1932.   
  1933.   static void
  1934. ***************
  1935. *** 1469,1474 ****
  1936. --- 1491,1497 ----
  1937.   {
  1938.     fatal ("output pipe has been closed");
  1939.   }
  1940. + #endif
  1941.   
  1942.   /* Strip off a legitimate source ending from the input string NAME of
  1943.      length LEN. */
  1944. ***************
  1945. *** 1522,1527 ****
  1946. --- 1545,1551 ----
  1947.     putc ('\"', asm_file);
  1948.   }
  1949.   
  1950. + #ifdef SYSV
  1951.   /* Output a file name in the form wanted by System V.  */
  1952.   
  1953.   void
  1954. ***************
  1955. *** 1552,1557 ****
  1956. --- 1576,1582 ----
  1957.   #endif
  1958.   #endif
  1959.   }
  1960. + #endif
  1961.   
  1962.   /* Routine to build language identifier for object file. */
  1963.   static void
  1964. ***************
  1965. *** 1664,1670 ****
  1966. --- 1689,1699 ----
  1967.       {
  1968.         register char *dumpname = (char *) xmalloc (dump_base_name_length + 6);
  1969.         strcpy (dumpname, dump_base_name);
  1970. + #ifndef atarist
  1971.         strcat (dumpname, ".jump");
  1972. + #else
  1973. +       strcat (dumpname, ".jmp");
  1974. + #endif
  1975.         jump_opt_dump_file = fopen (dumpname, "w");
  1976.         if (jump_opt_dump_file == 0)
  1977.       pfatal_with_name (dumpname);
  1978. ***************
  1979. *** 1686,1692 ****
  1980. --- 1715,1725 ----
  1981.       {
  1982.         register char *dumpname = (char *) xmalloc (dump_base_name_length + 6);
  1983.         strcpy (dumpname, dump_base_name);
  1984. + #ifndef atarist
  1985.         strcat (dumpname, ".loop");
  1986. + #else
  1987. +       strcat (dumpname, ".lop");
  1988. + #endif
  1989.         loop_dump_file = fopen (dumpname, "w");
  1990.         if (loop_dump_file == 0)
  1991.       pfatal_with_name (dumpname);
  1992. ***************
  1993. *** 1697,1703 ****
  1994. --- 1730,1740 ----
  1995.       {
  1996.         register char *dumpname = (char *) xmalloc (dump_base_name_length + 6);
  1997.         strcpy (dumpname, dump_base_name);
  1998. + #ifndef atarist
  1999.         strcat (dumpname, ".cse2");
  2000. + #else
  2001. +       strcat (dumpname, ".cs2");
  2002. + #endif
  2003.         cse2_dump_file = fopen (dumpname, "w");
  2004.         if (cse2_dump_file == 0)
  2005.       pfatal_with_name (dumpname);
  2006. ***************
  2007. *** 1708,1714 ****
  2008. --- 1745,1755 ----
  2009.       {
  2010.         register char *dumpname = (char *) xmalloc (dump_base_name_length + 6);
  2011.         strcpy (dumpname, dump_base_name);
  2012. + #ifndef atarist
  2013.         strcat (dumpname, ".flow");
  2014. + #else
  2015. +       strcat (dumpname, ".flo");
  2016. + #endif
  2017.         flow_dump_file = fopen (dumpname, "w");
  2018.         if (flow_dump_file == 0)
  2019.       pfatal_with_name (dumpname);
  2020. ***************
  2021. *** 1719,1725 ****
  2022. --- 1760,1770 ----
  2023.       {
  2024.         register char *dumpname = (char *) xmalloc (dump_base_name_length + 10);
  2025.         strcpy (dumpname, dump_base_name);
  2026. + #ifndef atarist
  2027.         strcat (dumpname, ".combine");
  2028. + #else
  2029. +       strcat (dumpname, ".cmb");
  2030. + #endif
  2031.         combine_dump_file = fopen (dumpname, "w");
  2032.         if (combine_dump_file == 0)
  2033.       pfatal_with_name (dumpname);
  2034. ***************
  2035. *** 1730,1736 ****
  2036. --- 1775,1785 ----
  2037.       {
  2038.         register char *dumpname = (char *) xmalloc (dump_base_name_length + 7);
  2039.         strcpy (dumpname, dump_base_name);
  2040. + #ifndef atarist
  2041.         strcat (dumpname, ".sched");
  2042. + #else
  2043. +       strcat (dumpname, ".sch");
  2044. + #endif
  2045.         sched_dump_file = fopen (dumpname, "w");
  2046.         if (sched_dump_file == 0)
  2047.       pfatal_with_name (dumpname);
  2048. ***************
  2049. *** 1741,1747 ****
  2050. --- 1790,1800 ----
  2051.       {
  2052.         register char *dumpname = (char *) xmalloc (dump_base_name_length + 6);
  2053.         strcpy (dumpname, dump_base_name);
  2054. + #ifndef atarist
  2055.         strcat (dumpname, ".lreg");
  2056. + #else
  2057. +       strcat (dumpname, ".lrg");
  2058. + #endif
  2059.         local_reg_dump_file = fopen (dumpname, "w");
  2060.         if (local_reg_dump_file == 0)
  2061.       pfatal_with_name (dumpname);
  2062. ***************
  2063. *** 1752,1758 ****
  2064. --- 1805,1815 ----
  2065.       {
  2066.         register char *dumpname = (char *) xmalloc (dump_base_name_length + 6);
  2067.         strcpy (dumpname, dump_base_name);
  2068. + #ifndef atarist
  2069.         strcat (dumpname, ".greg");
  2070. + #else
  2071. +       strcat (dumpname, ".grg");
  2072. + #endif
  2073.         global_reg_dump_file = fopen (dumpname, "w");
  2074.         if (global_reg_dump_file == 0)
  2075.       pfatal_with_name (dumpname);
  2076. ***************
  2077. *** 1763,1769 ****
  2078. --- 1820,1830 ----
  2079.       {
  2080.         register char *dumpname = (char *) xmalloc (dump_base_name_length + 8);
  2081.         strcpy (dumpname, dump_base_name);
  2082. + #ifndef atarist
  2083.         strcat (dumpname, ".sched2");
  2084. + #else
  2085. +       strcat (dumpname, ".sc2");
  2086. + #endif
  2087.         sched2_dump_file = fopen (dumpname, "w");
  2088.         if (sched2_dump_file == 0)
  2089.       pfatal_with_name (dumpname);
  2090. ***************
  2091. *** 1774,1780 ****
  2092. --- 1835,1845 ----
  2093.       {
  2094.         register char *dumpname = (char *) xmalloc (dump_base_name_length + 7);
  2095.         strcpy (dumpname, dump_base_name);
  2096. + #ifndef atarist
  2097.         strcat (dumpname, ".jump2");
  2098. + #else
  2099. +       strcat (dumpname, ".jp2");
  2100. + #endif
  2101.         jump2_opt_dump_file = fopen (dumpname, "w");
  2102.         if (jump2_opt_dump_file == 0)
  2103.       pfatal_with_name (dumpname);
  2104. ***************
  2105. *** 1798,1804 ****
  2106. --- 1863,1873 ----
  2107.       {
  2108.         register char *dumpname = (char *) xmalloc (dump_base_name_length + 10);
  2109.         strcpy (dumpname, dump_base_name);
  2110. + #ifndef atarist
  2111.         strcat (dumpname, ".stack");
  2112. + #else
  2113. +       strcat (dumpname, ".stk");
  2114. + #endif
  2115.         stack_reg_dump_file = fopen (dumpname, "w");
  2116.         if (stack_reg_dump_file == 0)
  2117.       pfatal_with_name (dumpname);
  2118. ***************
  2119. *** 2919,2930 ****
  2120. --- 2988,3009 ----
  2121.     int version_flag = 0;
  2122.     char *p;
  2123.   
  2124. + #ifdef atarist
  2125. + /* turn this on if you are going to set the TOS 1.4 dont clear heap flag */
  2126. + /*  _malloczero(1); */     /* zero mallocs by default */
  2127. + #endif  
  2128.     /* save in case md file wants to emit args as a comment.  */
  2129.     save_argc = argc;
  2130.     save_argv = argv;
  2131.   
  2132.     p = argv[0] + strlen (argv[0]);
  2133. + #ifndef atarist
  2134.     while (p != argv[0] && p[-1] != '/') --p;
  2135. + #else
  2136. +   while (p != argv[0] && ((p[-1] != '/') && (p[-1] != '\\') &&
  2137. +               (p[-1] != ':'))) --p;
  2138. + #endif
  2139.     progname = p;
  2140.   
  2141.   #ifdef RLIMIT_STACK
  2142. ***************
  2143. *** 2941,2949 ****
  2144. --- 3020,3030 ----
  2145.   
  2146.     signal (SIGFPE, float_signal);
  2147.   
  2148. + #ifndef atarist
  2149.   #ifdef SIGPIPE
  2150.     signal (SIGPIPE, pipe_closed);
  2151.   #endif
  2152. + #endif
  2153.   
  2154.     decl_printable_name = decl_name;
  2155.     lang_expand_expr = (struct rtx_def *(*)()) do_abort;
  2156. ***************
  2157. *** 3042,3047 ****
  2158. --- 3123,3140 ----
  2159.         else if (!strcmp (str, "dumpbase"))
  2160.           {
  2161.             dump_base_name = argv[++i];
  2162. + #ifdef atarist
  2163. +           /* dump_base_name will typically be 'foo.c' here.
  2164. +              Need to truncate at the '.', cause dots mean 
  2165. +              something here
  2166. +            */
  2167. +               {
  2168. +               char * n = dump_base_name;
  2169. +           for ( ; ((*n) && (*n != '.')) ; )
  2170. +                       n++;
  2171. +                   *n = '\0';
  2172. +           }
  2173. + #endif
  2174.           }
  2175.         else if (str[0] == 'd')
  2176.           {
  2177. ***************
  2178. *** 3473,3479 ****
  2179. --- 3566,3578 ----
  2180.        option flags in use.  */
  2181.     if (version_flag)
  2182.       {
  2183. + #if (defined(atarist) || defined(CROSSATARI) || defined(atariminix))
  2184. + #include "PatchLev.h"
  2185. +         fprintf (stderr, "%s version %s-atariST Patchlevel %s",
  2186. +          language_string, version_string, PatchLevel);
  2187. + #else
  2188.         fprintf (stderr, "%s version %s", language_string, version_string);
  2189. + #endif
  2190.   #ifdef TARGET_VERSION
  2191.         TARGET_VERSION;
  2192.   #endif
  2193. ***************
  2194. *** 3498,3503 ****
  2195. --- 3597,3604 ----
  2196.     if (output_bytecode)
  2197.       bc_write_file (stdout);
  2198.   
  2199. + #if (!(defined(atarist) || defined(atariminix)))
  2200. + #if (!(defined(CROSSHPUX)))
  2201.   #ifndef OS2
  2202.   #ifndef VMS
  2203.     if (flag_print_mem)
  2204. ***************
  2205. *** 3516,3521 ****
  2206. --- 3617,3624 ----
  2207.       }
  2208.   #endif /* not VMS */
  2209.   #endif /* not OS2 */
  2210. + #endif
  2211. + #endif
  2212.   
  2213.     if (errorcount)
  2214.       exit (FATAL_EXIT_CODE);
  2215. ***************
  2216. *** 3627,3629 ****
  2217. --- 3730,3763 ----
  2218.   
  2219.     fprintf (stderr, "\n");
  2220.   }
  2221. + #ifdef atarist
  2222. + void atari_output_filename(file, filename)
  2223. + FILE *file;
  2224. + char *filename;
  2225. + {
  2226. +     if( (!file) || (!filename) ) return;
  2227. +     for(; *filename; filename++)
  2228. +     {
  2229. +     if(*filename == '\\') putc('\\', file);
  2230. +     putc(*filename, file);
  2231. +     }
  2232. + }
  2233. + #include <string.h>
  2234. + char *atari_filename_nondirectory(p)
  2235. + char *p;
  2236. + {
  2237. +     char *s;
  2238. +     
  2239. +     for(s = p + strlen(p); s != p; --s)
  2240. +     {
  2241. +     if((*s == '/') || (*s == '\\'))
  2242. +         break;
  2243. +     }
  2244. +     
  2245. +     return (s == p) ? p : s+1;
  2246. + }
  2247. + #endif
  2248. diff -rc gcc-2.5.0/varasm.c /net/acae127/home/bammi/usr2/gcc/varasm.c
  2249. *** gcc-2.5.0/varasm.c    Thu Oct 21 13:14:24 1993
  2250. --- /net/acae127/home/bammi/usr2/gcc/varasm.c    Tue Oct 26 08:34:53 1993
  2251. ***************
  2252. *** 1354,1370 ****
  2253.   assemble_external_libcall (fun)
  2254.        rtx fun;
  2255.   {
  2256. ! #ifdef ASM_OUTPUT_EXTERNAL_LIBCALL
  2257.     if (!output_bytecode)
  2258. !     {
  2259. !       /* Declare library function name external when first used, if nec.  */
  2260.         if (! SYMBOL_REF_USED (fun))
  2261. !     {
  2262. !       SYMBOL_REF_USED (fun) = 1;
  2263. !       ASM_OUTPUT_EXTERNAL_LIBCALL (asm_out_file, fun);
  2264. !     }
  2265. !     }
  2266.   #endif
  2267.   }
  2268.   
  2269.   /* Declare the label NAME global.  */
  2270. --- 1354,1370 ----
  2271.   assemble_external_libcall (fun)
  2272.        rtx fun;
  2273.   {
  2274. !   /* Declare library function name external when first used, if nec.  */
  2275.     if (!output_bytecode)
  2276. !   {
  2277.         if (! SYMBOL_REF_USED (fun))
  2278. !       {
  2279. !           SYMBOL_REF_USED (fun) = 1;
  2280. ! #ifdef ASM_OUTPUT_EXTERNAL_LIBCALL
  2281. !           ASM_OUTPUT_EXTERNAL_LIBCALL (asm_out_file, fun);
  2282.   #endif
  2283. +       }
  2284. +   }
  2285.   }
  2286.   
  2287.   /* Declare the label NAME global.  */
  2288. ***************
  2289. *** 2814,2819 ****
  2290. --- 2814,2822 ----
  2291.        rtx x;
  2292.   {
  2293.     struct rtx_const val0, val1;
  2294. +   if (XEXP (x, 0) == pc_rtx || XEXP (x, 1) == pc_rtx)
  2295. +     return XEXP (x, 0) == XEXP (x, 1) ? const0_rtx : x;
  2296.   
  2297.     decode_rtx_const (GET_MODE (x), XEXP (x, 0), &val0);
  2298.     decode_rtx_const (GET_MODE (x), XEXP (x, 1), &val1);
  2299.